<?php $this->load->view('header'); ?>
<?php $this->load->view('menus'); ?>
<br />
<? foreach( $this->Projects->fetch_all($this->Accounts->fetch($this->Account->account_id)) as $project ) { ?>
	<h3><a href="<?=site_url('project/view/id/'.$project->project_id)?>"><?=$project->title?></a></h3>
	
	<ul class="shadetabs">
	<li><a href="<?=site_url('project/attach/comment/'.$project->project_id);?>">
		+ Comment</a></li>

	<? if( $this->Account->is_manager() || $this->Account->is_admin() ) { ?>
	<li><a href="<?=site_url('task/create/id/'.$project->project_id);?>">+ Task</a></li>
	<? } ?>

	<? if( $this->Account->is_admin() ) { ?>
	<li><a href="<?=site_url('project/attach/department/'.$project->project_id);?>">
		+ Departament</a></li>
	<li><a href="<?=site_url('project/remove/id/'.$project->project_id);?>" 
		onclick="return confirm('Are you sure?')">Delete</a></li>
	<? } ?>
	</ul>

	<div class="curlycontainer">
	<div class="innerdiv">
	<?=$project->description?>
	</div>
	</div>

	<hr />
<? } ?>

<?php $this->load->view('footer'); ?>


